<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>XL Widget</title>
    <script type="application/javascript" src="./../dist/xl.js"></script>
</head>
<style>
    body {
        font-family: -apple-system, BlinkMacSystemFont, Roboto, Open Sans, Helvetica Neue, sans-serif;
        background-color: #fff;
    }

    .social-link {
        cursor: pointer;
    }
</style>
<body>
<div>
    <div>XL login widget</div>
    <div id="xl_widget"></div>
</div>
<script type="application/javascript">
    window.onload = function () {
        XL.init({
            projectId: '40db2ea4-5d42-11e6-a3ff-005056a0e04a',
            onlyWidgets: true,
            redirectUrl: window.location.host
        });
        XL.AuthWidget('xl_widget', {
            widgetBaseUrl: 'http://aiougame.com/Account/loginWindow',
            width: 550,
            height: 520,
        });

        XL.on(XL.eventTypes.LOAD, function () {
            console.log('loaded');
            alert("加载完！")
        });

        XL.on(XL.eventTypes.CLOSE, function () {
            console.log('closed');
            alert("关闭！")
        });
    }
</script>
</body>
</html>